<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<script src="<c:url value='/js/search_valid.js'/>"></script>
<div class="page-header">
	<h3 style="margin-top: auto">检索数据实体</h3>
	<form class="form-search"  action="<%=request.getContextPath()%>/component/data_component/search"
			method="POST" onsubmit="return valid();">
		<div class="input-append">
			<select style="width: 100px" id="ctype" name="ctype">
				<option value=""></option>
				<option value="data">数据实体</option>
				<option value="type">类型实体</option>
				<option value="equipment">航电设备</option>
			</select> <input type="text" class="span2" id="searchText" name="searchText"
				style="width: 500px">
			<button type="submit" class="btn"><i class="icon-search"></i>&nbsp;检索</button>
		</div>
	</form>
</div>
<div class="row-fluid">
	<div>
		<c:choose>
			<c:when test="${!empty mylist}">
				<table class="table table-hover" style="width: 90%">
					<thead>
						<tr>
							<th width="10%">编号</th>
							<th width="30%">名称</th>
							<th width="30%">中文名称</th>
							<th width="15%">类型</th>
							<th width="15%">操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${mylist}" var="list" varStatus="s">
							<tr>
								<td><c:out value="${s.count}" /></td>
								<td><c:out value="${list.name}" /></td>
								<td><c:out value="${list.cnName}" /></td>
								<td><c:out value="${list.type}" /></td>
								<td><div class="btn-group">
										<button class="btn"
											onclick="window.location.href='<%=request.getContextPath()%>/${list.uri.replace(':','/')}';"><i class="icon-search"></i>&nbsp;详细信息</button>
									</div></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</c:when>
			<c:otherwise>
				<h3 style="margin-top: auto">数据库暂无相关数据实体</h3>
			</c:otherwise>
		</c:choose>
	</div>
</div>
<!--/row-->